//
//  FunScendTableViewCell.m
//  MarryMe
//
//  Created by lanou3g on 16/1/7.
//  Copyright © 2016年 revocher. All rights reserved.
//

#import "FunScendTableViewCell.h"
#import "FunModel.h"
#import <MessageUI/MessageUI.h>
@implementation FunScendTableViewCell

- (void)awakeFromNib {
    self.titleLabel.textColor=[UIColor redColor];
    self.addLbale.numberOfLines=0;
    self.workimageView.numberOfLines=0;
    self.addLbale.font=[UIFont systemFontOfSize:13];

    self .callimageV.image=[UIImage imageNamed:@"dianhua"];
    self.workImageView.image=[UIImage imageNamed:@"shijian"];
    self.addIamgeView.image=[UIImage imageNamed:@"dizhi"];
   }

-(void)setCellFunModel:(FunModel *)model{
    self.titleLabel.text=model.name;
    self.addLbale.text=model.address;
    self.workimageView.text=model.business_time;
   [self.callLable  setTitle:model.contact forState:UIControlStateNormal];
}

- (IBAction)buttonDidCirled:(id)sender {
   NSString *str=[self.callLable.titleLabel.text substringToIndex:12];
    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"tel://%@",str]]];
    [UIView animateWithDuration:0.3f animations:^{
        self.callLable.layer.affineTransform=CGAffineTransformMakeScale(1.2, 1.2);
    } completion:^(BOOL finished) {
        self.callLable.layer.affineTransform=CGAffineTransformMakeScale(1,1);
        
    }];
    NSLog(@"%@",str);
}




- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
